package ciyuan.Player.Skill.Passive;

import ciyuan.Effect.Effects;
import ciyuan.Player.Skill.MySkill;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.potion.EffectInstance;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TranslationTextComponent;

public class MagicIncrease extends MySkill {
    @Override
    public void keyDown(PlayerEntity playerEntity) {

    }

    @Override
    public String getSkillCastName() {
        return "MagicIncrease";
    }

    @Override
    public ITextComponent getSkillDescription() {
        return new TranslationTextComponent("ciyuan.skill.desc.29");
    }

    @Override
    public ITextComponent getSkillName() {
        return new TranslationTextComponent("ciyuan.skill.name.29");
    }

    public static void onSkillHit(Entity entity) {
        if (entity instanceof LivingEntity) {
            LivingEntity livingEntity = (LivingEntity) entity;
            livingEntity.addEffect(new EffectInstance(Effects.magic_increase,40,0));
        }
    }
}
